package com.ebupt.migu.music.effectStatistics.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ebupt.migu.music.effectStatistics.entity.StatisticsSms;
import com.ebupt.migu.music.effectStatistics.entity.vo.SMSDailyReportExportVo;
import com.ebupt.migu.music.effectStatistics.entity.vo.SmsExportVo;
import com.ebupt.migu.music.strategy.entity.StrategyInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
@DS("mysql_mg")
public interface SMSOperationMapper extends BaseMapper<StatisticsSms> {
    /**
     * 统计查询条总数
     *
     * @param params
     * @return
     */
    Integer countQuery(Map<String, Object> params);

    Integer countSummary(Map<String, Object> params);

    /**
     * 分页查询
     *
     * @param params
     * @return
     */
    List<HashMap<String, Object>> queryMap(Map<String, Object> params);

    List<HashMap<String, Object>> querySummary(Map<String, Object> params);

    /**
     * 全量导出
     *
     * @param params
     * @return
     */
    List<SmsExportVo> exportMap(Map<String, Object> params);

    List<SmsExportVo> exportSummary(Map<String, Object> params);

    /**
     * 目标人群
     * 
     * @param params
     * @return
     */
    List<HashMap<String, Object>> targetUser(Map<String, Object> params);

    /**
     * 根据策略id查询策略ry
     * 
     * @return
     */
    StrategyInfo qryByStrategyId(@Param("strategyId") String strategyId);

    /**
     * 短信日报
     */
    int countReportQuery(Map<String, Object> params);

    List<HashMap<String, Object>> queryReportMap(Map<String, Object> params);

    /**
     * 短信日报导出
     * 
     * @param params
     * @return
     */
    List<SMSDailyReportExportVo> dailyExportMap(Map<String, Object> params);
}
